package com.chen.rocketmq.consumer;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author chenyulei
 */
@Component
@RocketMQMessageListener(topic = "zhangsantopic",consumerGroup = "myConsumerGroup2")
public class Consumer2 implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        System.out.println("消费者2收到消息："+s);
    }
}
